package ch.silviowangler.hockeygame.domain;

import org.springframework.stereotype.Repository;
import org.springframework.util.Assert;

import java.util.Set;

/**
 * @author Silvio Wangler
 * @since 1.0
 *        Date: 19.06.2010
 */
@Repository
public class UserDao extends HibernateAnnotatedDao implements GenericDao<User> {

    @Override
    public User find(Long id) {
        Assert.notNull(id, "user id cannot be null");
        return load(User.class, id);
    }

    @Override
    public User create(User user) {
        Long id = (Long) save(user);
        return find(id);
    }

    @Override
    public Set<User> create(Set<User> users) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public User modify(User user) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public Set<User> modify(Set<User> t) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public void purge(User user) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public void purge(Set<User> t) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
